export function setupDirective(app) {
    // 相当于webpack中的require.context的作用
    const directives = import.meta.glob('./*/index.js')
    for (let dire in directives) {
        const direKey = dire.match(/\.\/(.*?)\/index\.js/)[1]
        directives[dire]().then((res) => {
            const direValue = res.default
            app.directive(direKey, direValue)
        })
    }
}